<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditStudentExamsTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditStudentExamsLabel_id}" for="id" />
                    <h:inputText id="id" value="#{studentExamsController.selected.id}" title="#{bundle.EditStudentExamsTitle_id}" required="true" requiredMessage="#{bundle.EditStudentExamsRequiredMessage_id}"/>
                    <h:outputLabel value="#{bundle.EditStudentExamsLabel_mark}" for="mark" />
                    <h:inputText id="mark" value="#{studentExamsController.selected.mark}" title="#{bundle.EditStudentExamsTitle_mark}" />
                    <h:outputLabel value="#{bundle.EditStudentExamsLabel_remark}" for="remark" />
                    <h:inputText id="remark" value="#{studentExamsController.selected.remark}" title="#{bundle.EditStudentExamsTitle_remark}" />
                    <h:outputLabel value="#{bundle.EditStudentExamsLabel_status}" for="status" />
                    <h:inputText id="status" value="#{studentExamsController.selected.status}" title="#{bundle.EditStudentExamsTitle_status}" />
                    <h:outputLabel value="#{bundle.EditStudentExamsLabel_studentId}" for="studentId" />
                    <h:selectOneMenu id="studentId" value="#{studentExamsController.selected.studentId}" title="#{bundle.EditStudentExamsTitle_studentId}" >
                        <f:selectItems value="#{studentsController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditStudentExamsLabel_examId}" for="examId" />
                    <h:selectOneMenu id="examId" value="#{studentExamsController.selected.examId}" title="#{bundle.EditStudentExamsTitle_examId}" >
                        <f:selectItems value="#{examsController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{studentExamsController.update}" value="#{bundle.EditStudentExamsSaveLink}"/>
                <br />
                <br />
                <h:link outcome="View" value="#{bundle.EditStudentExamsViewLink}"/>
                <br />
                <h:commandLink action="#{studentExamsController.prepareList}" value="#{bundle.EditStudentExamsShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.EditStudentExamsIndexLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
